<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>

<style type="text/css">



  /* default css */
  
  table {
    font-size: 1em;
  }

  
  div, address, ol, ul, li, option, select { 
    margin-top: 0px;
    margin-bottom: 0px;
  }

  p {
    margin: 0px;
  }

  body {
    padding: 0px;
    
    
      margin: 0px;
    
  }

  h6 { font-size: 10pt }
  h5 { font-size: 11pt }
  h4 { font-size: 12pt }
  h3 { font-size: 13pt }
  h2 { font-size: 14pt }
  h1 { font-size: 16pt }

  blockquote {padding: 10px; border: 1px #DDD dashed }

  a img {border: 0}

  strike { text-decoration: line-through }

  div.google_header, div.google_footer {
    position: relative;
    margin-top: 1em;
    margin-bottom: 1em;
  }
  /* end default css */

  
    /* default print css */
    @media print {
      body { 
        padding: 0; 
        margin: 0; 
      }

      ol[type="a"] { list-style-type: lower-alpha }
      ol[type="A"] { list-style-type: upper-alpha }
      ol[type="i"] { list-style-type: lower-roman }
      ol[type="I"] { list-style-type: upper-roman }
    
      div.google_header, div.google_footer {
        display: block;
        min-height: 0;
        border: none;
      }

      div.google_header {
        flow: static(header);
      }

      /* used to insert page numbers */
      div.google_header::before, div.google_footer::before {
        position: absolute;
	top: 0;
      }

      div.google_footer {
        flow: static(footer);
      }

      /* always consider this element at the start of the doc */
      div#google_footer {
        flow: static(footer, start);
      }

      span.google_pagenumber {
        content: counter(page);
      }

      span.google_pagecount {
        content: counter(pages);
      }
    }

    @page {
      @top {
        content: flow(header);
      }
      @bottom {
        content: flow(footer);
      }
    }
    /* end default print css */
   
  
  /* custom css */
  
  
  /* end custom css */

  /* ui edited css */
  
  body {
    font-family: Verdana;
    
    font-size: 10.0pt;
    line-height: normal;
    background-color: #ffffff;
  }
  /* end ui edited css */

</style>
</head>


<body revision="dgtsd5n5_3mf9cwp:156">

<h2>
  <b>Terminology</b>
</h2>
(I'm a computer scientist. Please let me know the correct Library Science
terminology I should be using.)<br>
<br>
<b>Items - </b>the things in your collection.&nbsp; For example, Monet's
Waterlilies.<br>
<br>
<b>Tags - </b>the properties they have.&nbsp; For example,<br>
<br>
<span style="FONT-FAMILY:Courier New">Date -- 20th century --
1903</span><br style="FONT-FAMILY:Courier New">
<br>
All three properties are called tags.&nbsp; Top-level tags, like Date, are called
<b>Tag Categories</b>, and they require some extra information.<br>
<br>
<i>Note: I started using the term "tag" since end-users are becoming familiar
with it for uncontrolled vocabularies, like in Flickr. I previously used
"facet,"&nbsp; which is often used in the Library Science community (</i><i>and
"facet type" for "tag category"). The database table and column </i><i>names
still </i><i>reflect the old terminology. I'm open to suggestions for better
terms.</i><br>
<br>

<h2>Procedure</h2>
<b>1. Populate</b><br>
    You must create and populate six MySQL tables in a new database, and assign privileges to user bungee. There is a Java
    application, ../bin/populate.jar, that will create them for you and assign privileges. If your meta-data is
    MARC or Dublin Core in OAI-format .xml files, it will also populate them.  You will likely need to do some clean-up manually, however, so it
will be helpful to understand the
<a href=Database_Schema.html id=vd5i title=here>schema</a>.
Depending on the richness of your meta-data, this step may take a long time and
require changes to the java code for populate. Please work with
<a href=http://www.cs.cmu.edu/%7Emad/ id=epxi title="Mark Derthick">Mark
Derthick</a> to improve populate and its documentation. A detailed description
is <a href=Populate.html id=o.ha title=here>here</a>.<br>
<br>
<div>
  <table bgcolor=#cccccc border=0 cellpadding=3 cellspacing=0 id=isuc width=100%>
    <tbody>
    <tr>
      <td width=100%>
        <br>
	Example command to populate a copy of the wpa database from an OAI MARC xml file:
        <br>
        <br>
java -enableassertions -jar populate.jar -db wpa2 -server jdbc:mysql://localhost/ -user root -pass PASSWORD -files loc-*.xml -cities Places.txt -renames Rename.txt -moves MyTGM.txt,places_hierarchy.txt,Moves.txt -reset<br>
        <br>
      </td>
    </tr>
    </tbody>
  </table>
</div>
<br>
The above won't load images.  Images are generally scraped from web pages.  If you want to scrape thumbnails from the Library of Congress web site, add these arguments:<br><br>

-image_url_getter URI -image_regexp "IMG SRC=\"(http.*\.gif)\""

<br><br>
The first is an SQL expression applied to the item table returning a URL.  If the URL is not an image, you must provide the second argument, which is a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">Java regular expression</a> to extract the image URL from the content of the first URL.

<br><br>
<b>2. Compile</b><br>
<br>
<i>Note: If have have populate read in the data (as in the example above), it will automatically call compile, so you can skip this step.</i>
<br>
<br>
This will check the six input tables for errors, generate additional tables used by Bungee View at run time,
and check them for errors. It will automatically "fix" many of the errors it
finds in the input tables, including deleting tags with no items or items with
no tags. Therefore you should <b><i>BACK UP THE DATABASE TABLES</i></b> before
you run compile. All you have to do is copy the directory where MySQL stores
your database. If the database becomes corrupted, just delete the directory from
MySQL and copy your backup directory back again. The data directory will be
something like this:<br>
<br>
C:\Program Files\MySQL\MySQL Server 5.0\data\wpa2<br>
<br>
<br>
Run compile like this, changing wpa2 to your database name and PASSWORD to your
MySQL root password. Make sure mysql-connector-java-5.0.3-bin.jar is in the same
directory as compile.jar.<br>
<b><br>
</b>
<div>
  <table bgcolor=#cccccc border=0 cellpadding=3 cellspacing=0 id=isuc width=100%>
    <tbody>
    <tr>
      <td width=100%>
        <br>
        java -jar compile.jar -db wpa2 -server jdbc:mysql://localhost/ -user root
        -pass PASSWORD<br>
        <br>
      </td>
    </tr>
    </tbody>
  </table>
</div>
<br>
Fix any errors that weren't fixed automatically, and keep running it until it
completes successfully.<br>
<br>
Sanity check the Summary table that is printed out:<br>
<ul>
  <li>
    Make sure it is ignoring just what you want to ignore. These tag categories
    are the ones for which you gave a negative sort value in the raw_facet_types
    table. They won't show up in the interface.
  </li>
  <li>
    Make sure the number of immediate child tags for each category looks right,
    and that the sample child tag is valid. If the number of children is zero,
    you MUST ignore that category.&nbsp; If there is just one it's probably a
    good idea to ignore it.<br>
  </li>
</ul>
<br>
<br>
<br>
<b>3. Install into Tomcat</b><br>
<br>
Edit web.xml to add the new database to the comma-separated list for the parameter "dbs".
The first database in the list is the default, and others can be chosen using the menu in the client. Or any database on the list can be selected by adding a parameter to the URL like this:
<br>
<br>
http://localhost/bungee/?db=wpa2
<br>
<br>
Restart Tomcat or just the bungee webApp.
<br></body>
</html>
